package com.wss.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.SessionAttribute;

import com.wss.dto.UsersDTO;
import com.wss.service.IUsersService;

@Controller
public class UsersController {
	
	@Resource
	private IUsersService usersService;

	@RequestMapping("login")
	public String login(UsersDTO user) {
		UsersDTO u = usersService.login(user);
		if(u!=null) {
			return "index";
		}else {
			return "login";
		}
		
	}
	
}
